#pragma once

#include "Includes.h"
#include "Utilities.h"
#include "ChecksumCRC.h"

class CUserCmd
{
public:
	CUserCmd();
	virtual ~CUserCmd();
	void Reset();
	CUserCmd& operator =( const CUserCmd& src );
	CUserCmd( const CUserCmd& src );
	CRC32_t GetChecksum( void ) const;

	// For matching server and client commands for debugging
	int		command_number;

	// the tick the client created this command
	int		tick_count;

	// Player instantaneous view angles.
	SD_Tools::Angle	viewangles;     
	// Intended velocities
	//	forward velocity.
	float	forwardmove;   
	//  sideways velocity.
	float	sidemove;      
	//  upward velocity.
	float	upmove;         
	// Attack button states
	int		buttons;		
	// Impulse command issued.
	BYTE    impulse;        
	// Current weapon id
	int		weaponselect;	
	int		weaponsubtype;

	int		random_seed;	// For shared random functions

	short	mousedx;		// mouse accum in x from create move
	short	mousedy;		// mouse accum in y from create move

	// Client only, tracks whether we've predicted this command at least once
	bool	hasbeenpredicted;

};

class CVerifiedUserCmd
{
public:
	CUserCmd	m_cmd;
	CRC32_t		m_crc;
};